package edu.sctu.nieyu.day20150609;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by user01 on 2015/6/9.
 */
public class TimeUitl {

    public void timeMessage(){


        String time = "2015-5-8 17:05:01";
        SimpleDateFormat simple = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
        Date date = null;
        try{
            date = simple.parse(time);
        }catch (ParseException e){
            e.printStackTrace();
        }
        System.out.println(simple.format(date));

    }

    public static void main(String[] args) {
        TimeUitl tu = new TimeUitl();
        tu.timeMessage();
    }
}
